def some_sum(n,m):
	s = 0
	for k in range(n+1):
		s += k**m
	return s

n = 600_000_000
m = 3

# 32400000108000000090000000000000000
# 3.2400000108e+34
# time ~ 10 min

print(some_sum(n,m))

s_1 = n*(n+1)/2
s_2 = n*(n+1)*(2*n+1)/6
s_3 = (n*(n+1))**2/4

if m == 1:
    print(s_1)
elif m == 2:
    print(s_2)
elif m == 3:
    print(s_3)
else:
	pass

# n = 60_000
# 3240108000900000000
# 3.2401080009e+18
